home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
2510.ZIP
/
TRSOURCE.EXE
/
EXPONENT.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
544b
|
29 lines
/*********
* EXPONENT.C
*
* by Ralph Davis
* modified by Tom Rettig
*
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* Syntax: EXPONENT( <expN> )
* Return: Power of 2 used to represent <expN> in memory
*********/
#include "trlib.h"
TRTYPE exponent()
{
if ( PCOUNT==1 && ISNUM(1) )
{
int expon = 0;
double result, n;
n = _parnd(1);
result = _tr_frexp(n,&expon); /* Returns exponent in expon */
_retni(expon);
}
else
_retni( ERROR );
}